exports.helper = function(template){
    template.defaults.imports.formatTime=function (t, hasHour) {
        var result = '';
        var year = t.getFullYear();
        var month = t.getMonth()+1;
        var day = t.getDate();
        var hour = t.getHours();
        var minutes = t.getMinutes();
        if(hour<10){
            hour = '0' + hour
        }
        if(minutes<10){
            minutes = '0' + minutes
        }
        if(!hasHour){
            result = year + '-' + month + '-' + day;
        }else{
            result = year + '-' + month + '-' + day + ' ' + hour + ':' + minutes;
        }
        return result;
    }
}